package Ex241210;

public class Rectangle extends ShapeVirtual{
    private double width;
    private double height;
    public Rectangle(double width, double height){
        this.width = width;
        this.height = height;
    }
    public double calculateArea(){
        return width * height;
    }
    public void cout_area(){
        System.out.print("长为");
        System.out.print(width);
        System.out.print("，宽为");
        System.out.print(height);
        System.out.print("的矩形的面积为");
        System.out.println(calculateArea());
    }
}
